add comment to understand when it cannot reach current i with current max distance, so jump to i first with 1 step, then continue