iterator has been replaced with foreach