implementing button functionalities