revised the trigger some more, an optional option is added as a comment