Added traversal code