merge pull request #35, changes in generator.go