set up for stream functions