nit: please use retry+1, since "retry attempts" aren't really zero-indexed