update button callback function