Okay! Thanks for the explanations @julienw , helps to learn.  I will revisit it with this approach and also check with @jugglinmike about adding integration and test for this.  Or, did you mean a unit test instead?