Added callback functions to the buttons