refactoring in the generate suite code from issue #1