added tests for directed graphs