anchor.diff:      end,
   	UpdateJson2 = "{\"script\":\"if (ctx._source.history.size() == 100){ctx._source.history.remove((Object) ctx._source.history[0]);ctx._source.history += msg}{ctx._source.history += msg} \",\"params\":{\"msg\":"++ Message ++"}}",
   	case api_help:update_doc(?INDEX, "pollinghistory", StreamId, UpdateJson2, []) of
  +	{error, {404, Body2}} -> create_poller_history(StreamId, Message);
           {error, {Code2, Body2}} ->
   			erlang:display("Error when updateing pollinghistory for " ++ StreamId),
               {error, {Code2, Body2}};
  
positive.code: %% @author Gabriel Tholsgrd, Li Hao
  %%   [www.csproj13.student.it.uu.se]
  %% @version 1.0
  %% @copyright [Copyright information]
  
negative.code:     end,
  	UpdateJson2 = "{\"script\":\"if (ctx._source.history.size() == 100){ctx._source.history.remove((Object) ctx._source.history[0]);ctx._source.history += msg}{ctx._source.history += msg} \",\"params\":{\"msg\":"++ Message ++"}}",
  	case api_help:update_doc(?INDEX, "pollinghistory", StreamId, UpdateJson2, []) of
  	{error, {404, Body2}} -> create_poller_history(StreamId, Message);
          {error, {Code2, Body2}} ->
  			erlang:display("Error when updateing pollinghistory for " ++ StreamId),
              {error, {Code2, Body2}};
  