Added metric calculation, and random jump within maxJumpDistance