first modifications to solver.py