restrict iterators by outcode