working on subgenerator controller