graph traversal algorithm implement.