updated the button code