update button code