improved version of canJump