made transform_iterator more Iterator-compatible