refactor tapping code, try to run in EX16 GDK