implementing get network by edges