iterator replace on process function