Working on filtering
some minor fixes to stream object