just some msgStream helper functions.. this object should be rewritten.