write handle_pointer_event function
remove resize code