cleaning up and fixed swipe gesture