full heuristic functions