add function join and disconnect