Adding callback events for the buttons