code for two switches to move right and left