Add logic for update trigger