Solver rewrite