added support for curved and undirected edges