split out event handlers to a new file