improve and simplify pointer events