changed goal to a heuristic