Changed heuristic to only gradient