added button functions

building button functionality