implemented iterator

(I hope)