partial reimplementation of event listeners using pointer.js