foreach loop iterate iterator next previous first last begin finish