implemented the pointerend button