added more generator code