changed it to loop