converted iterator to array