Update logic for update action