tiny bit more work on the heuristic solver