restructure streamController