finished part of solver.  Implementing the main method later, which has
mostly been written in testInput