added addedge and partial getedge