add frequency of edges