introduced custom touch listener to calculate swipes