made jump checking using loop instead of multiple if statements
changed if statements to for loop in jump logic