Improving list traversal