added the blocks of code for the buttons