switched all the directions, and fixed right code