Solve method fixed

Still need to test but solve method fixed