subroutine to add edge
ignore kbt.org