added solver.py, with a class and init function