progres made; still working on the .gsub inside an iterator problem.