added factory subgenerator