added a total flow and pref flow measure to output