added state machines for all directions of gestures in the xy axis