initial solution creation, with some initial prototype code copied over