break the loop when done