implemented functions of buttons