Added code to calculate swipe length

In order to make swipe less sensitive