basic chatroom fucntion