add joinChannel method and test code