fix syntax errors
added ensure_iterable