quit button and uncomment event handler