add and remove event handlers, plus a crude example