switched to using .on() for event handlers