add heuristic dot function in d_vec