break the loop if we are finished