implement swipe handling directly.