remove FIterator and rewrite dependent code