updated the loop
update