Updating the trigger script