solver class made.  this is the final version for submission