add option to iterate output