use nonconst iterator