mapping process iterator to avoid aut of bounds array access