solver implementation beginning