created stream function outline