add functionality to buttons