added callback for pointer motion