fixed a bug -- direction of swipe was backwards