added simple graph traversal