final optimizations to traversal