change chatroom function