Adding initial undirected functionality