Added some code to stream events