first almost working version (only tapping is missing)