made it loop until done