Implemented buttonlistener for buttons