refactor edge drawing
refactor edge drawing