use np.array
refactor, use graph_utils