support swiping in both directions