adding proper concept of edges