added function for button - working on the functionality right now