Added an event for button pressing