Add functionality for supporting directed graphs