Added random heuristic