worked on the loops