added event to buttons