added new callbacks + slight change to swipe function