fixed solver.py