first pass at setting up event handling