updated buttons and format of code