updated createstream, exitstream and joinstream