correct packet flag in example
control memory allocation for packets in streams
adding more examples for streams