changing the way swipe is detected and initial setup