preprocessJumps function