Adding functionality to the Update button.