finished implementing new event handler