Change flow to create prefix while iterating.