wired up the buttons to event handlers