running code, but not gesture control not working smoothly