restore previous API; detect string vs. iterable automatically