add edge mostly working