updated to handle swipes working