refactor Two-tap mode