Adding more functionality to buttons