create a startStream function