break out of loop when done