and call it in the loop