add flags for controlling swipe