anchor.diff:  	{ok, Count} = xnest:status(XNestPid, client_counts),
   	ResponseMsg = make_response(self(), State#state.xnest_name, {'member_count', Count}),
   	{reply, {text, ResponseMsg}, Req, State};
  +
  +
  +%% @private
  +%% @doc Receive history command from self 
  +websocket_info({'history'}, Req, State) ->
  +	XNestPid = State#state.xnest_pid,
  +	{ok, History} = xnest:history(XNestPid, 10),
  +	ResponseMsg = make_response(self(), State#state.xnest_name, {'history', History}),
  +	{reply, {text, ResponseMsg}, Req, State};
  +
  +
  +
   
   %% @private
   %% @doc Receive Message from xnest and send it to client
  
positive.code: make_response(FromPid, Xnest, {Type, Msg}) ->
  	Time = time2binary(erlang:localtime()),
  	From = pid2binary(FromPid),
  	Frame = [ {<<"from">>, From}
  		,{<<"xnest">>, Xnest}
  		,{<<"type">>, Type}
  		,{<<"payload">>, Msg}
  		,{<<"send_time">>, Time}
  	],
  	Response = jsx:encode(Frame),
  	Response.
  
  
negative.code: 			{Nick, Req1}
  	end,
  	% set nickname to cookie
  	Req_ = cowboy_req:set_resp_cookie(<<"nickname">>, NickName, [{max_age, 3600}], _Req),
  	{NickName, Req_}.
  
  
  