changed to iterators over code, no char conversion