attempting traversal algorithm