tweaking the button code