toggle between two directions