anchor.diff:  parse_xnest_name(Req) ->
   	cowboy_req:qs_val(<<"xnest">>, Req, <<>>).
   
  +%% @doc Parse client nickName from HTTP Req
  +-spec parse_nickname(req()) -> {binary(), req()}.
  +parse_nickname(Req) ->
  +	cowboy_req:qs_val(<<"nickname">>, Req, <<"潜水员">>).
  +
   %% @doc Join a xnest 
  --spec join_xnest(binary()) -> {ok, pid()}.
  -join_xnest(XNestName) ->
  +-spec join_xnest(binary(), binary()) -> {ok, pid()}.
  +join_xnest(XNestName, NickName) ->
   	{ok, XNestPid} = xnest_manager:get_xnest(XNestName),   %% I can know what format will be return by xnest_manager
  -	{ok, JoinResult} = xnest:join(XNestPid, self()),
  +lager:info("~s", [NickName]),
  +	{ok, JoinResult} = xnest:join(XNestPid, self(), NickName),
   	xnest:input(XNestPid, {self(), text, {'join', JoinResult}}),			%% Use xnest API to send join message
   	{ok, XNestPid}.
   
  
positive.code: %% @private
  websocket_init(_TransportName, Req, _Opts) ->
  	{XNestName, Req1} = parse_xnest_name(Req),
  	self() ! {'self'},		%% send a command to self 
  	{ok, XNestPid} = join_xnest(XNestName),
  	State = #state{
  		xnest_name	= XNestName,
  		xnest_pid	= XNestPid
  	},
  	Req2 = cowboy_req:set_resp_header(<<"access-control-allow-origin">>, <<"*">>, Req1),
  	self() ! {'member_count'},		%% send a command to self 
  	{ok, Req2, State}.
  
  
  
  
negative.code: 
  
  -record(state, {
  	nickname	= <<>> :: binary(),
  	xnest_name	= <<>> :: binary(),
  	xnest_pid	= <<>> :: pid()
  }).
  
  
  