buttons functionality added