syntax change using iterator in finding out current sequence number