brutishly modified exp in solver.cpp to incorporate a hardcoded min