Updated to use new event handler