adding more functionality to buttons