added buttons and tied functions to buttons