inside the loop