anchor.diff:  	Card ->
   	    lager:info("Playing ~p~n",[Card]),
   	    R = table_sup:play(TablePid, Card),
  -	    {response(R, play), S}
  +	    {response(R, play), new_state(R, S)}
       end;
  -handle([<<"save">>, Cds], {joined, TablePid} = S) ->
  +handle([<<"save">>, Cds], {joined, TablePid, _, _, _} = S) ->
       Cs = (catch lists:map(fun decode_card/1, Cds)),
       case Cs of
   	{'EXIT', _} ->
  
positive.code:     TableName = binary_to_list(N),
      R = table_sup:join_or_create(TableName, true),
      {Resp, NewState} = case R of
  		   {ok, Pid} -> {{ok}, {joined, Pid}};
  		   E -> {E, S}
  	       end,
      {response(Resp, join), NewState};
  handle([<<"leave">>], {joined, TablePid} = S) ->
      R = table_sup:leave(TablePid),
      NewState = case R of
  		   {ok} -> {logged_in};
  		   _ -> S
  	       end,
      {response(R, leave), NewState};
  handle([<<"lielais">>], {joined, TablePid} = S) ->
      R = table_sup:lielais(TablePid),
      {response(R, lielais), S};
  handle([<<"zole">>], {joined, TablePid} = S) ->
      R = table_sup:zole(TablePid),
      {response(R, zole), S};
  handle([<<"pass">>], {joined, TablePid} = S) ->
      R = table_sup:pass(TablePid),
      {response(R, pass), S};
  handle([<<"last_game">>], {joined, TablePid} = S) ->
      R = table_sup:last_game(TablePid),
      {response(R, last_game), S};
  handle([<<"tables">>], S) ->
      spawn(?MODULE, get_tables, [self()]),
      {response({ok}, tables), S};
  handle([<<"play">>, Crd], {joined, TablePid} = S) ->
      Cs = (catch decode_card(Crd)),
      case Cs of
  	{'EXIT', _} ->
  
negative.code:     lager:info("WS handle ~p ~p ~n",[ Data, State]),
      {ok, Req, State}.
  
  websocket_info({timer, Msg, Ref}, Req, {joined, Pid, true, N, Ref}) ->
      lager:info("WS timer ~p ~p ~n",[Msg, N]),
      timer:send_after(?PROMPT_REPEAT, {timer, Msg, Ref}),
      {reply, {text, jsx:encode(transform(Msg))}, Req, {joined, Pid, true, N + 1, Ref}};
  websocket_info({timer, _, _}, Req, S) ->
      {ok, Req, S};
  websocket_info(Msg, Req, State) ->
      lager:info("WS info ~p ~n",[Msg]),
      {reply, {text, jsx:encode(transform(Msg))}, Req, waiting_state(Msg, State)}.
  
  websocket_terminate(Reason, _Req, State) ->
          lager:info("WS TERMINATE ~p ~p~n",[Reason, State]),
  	ok.
  
  waiting_state({prompt, _} = Msg, {joined, Pid, _, _, _}) ->
      Ref = make_ref(),
      timer:send_after(?PROMPT_REPEAT, {timer, Msg, Ref}),
      {joined, Pid, true, 0, Ref};
  waiting_state(_, S) ->
      S.
  
  handle([<<"login">>, N], {} = S) ->
      Name = binary_to_list(N),
  