adding a loop