added support for edges to the same element