reverted to original looping