consolidate stream and nonstream