Can you change this to be a bit more Ruby-ish like `max_tries.times do ... end`?