added event handler to buttons