Completed update function