none of the two version work. The new one has a problem with iterators