some slight changes to heuristic engine