refactored and 2nd attemp for swipe function
Merge pull request #6 from MissingLabel/swipe_functions

refactored and 2nd attemp for swipe function