first draft of generator, changes to solver