change iterator to seq