inital solve complete, refactoring needed