Despite my comment before, we probably don't need the tryagain variable - just use continue & break to work with the loop.