implemented suggestions from @pledbrook

https://github.com/timyates/groovy-common-extensions/commit/cae91118fafdabc4efd3baaa55b6bbc3c1ecf6e3#commitcomment-3100130