fixed up right and down left pathing
cleaned up the code by making the If statements
into a method