refactor
big refactor of edge to edgeU and edgeD