interator pattern test