update button, refactor