Created some basic  functions for streaming