small mods to data flow