adds drawEdge functionality