anchor.diff:  	TS = {_MSec,_Sec,Micro} = os:timestamp(),
   	{{Year,Month,Day},{Hour,Minute,Second}} = calendar:now_to_universal_time(TS),
   	Mstr = element(Month,{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}),
  -	io_lib:format("~2w ~s ~4w ~2w:~2..0w:~2..0w.~6..0w", [Day,Mstr,Year,Hour,Minute,Second,Micro]).
  -
  -
  -
  -
  +	binary:list_to_bin(io_lib:format("~2w ~s ~4w ~2w:~2..0w:~2..0w.~6..0w", [Day,Mstr,Year,Hour,Minute,Second,Micro])).
  +
  +
  +
  +
  
positive.code: update_resource(Resource, ResourceId) ->
  	erlang:display("-2-2-2-2-2-2-2"),
  	erlang:display(ResourceId),
  	Manufacturer = binary_undefined_to_string(lib_json:get_field(Resource, "manufacturer")),
  	Model = binary_undefined_to_string(lib_json:get_field(Resource, "model")),
  	Tags = binary_undefined_to_string(lib_json:get_field(Resource, "tags")),
  	Polling_freq = binary_undefined_to_string(lib_json:get_field(Resource, "polling_freq")),
  	RId = list_to_binary(ResourceId),
  	erlang:display("-1-1-1-1-1-1-1"),
  	%fetch old suggestion
  
negative.code: 		undefined ->
  			{error, no_model};
  		_ ->
  		           Suggestion = lib_json:set_attrs(
  					  [
  					   {resource_id, ResourceId},
  					   {suggest, "{}"},
  					   {"suggest.input", Model},
  					   {"suggest.output", get_timestamp()},
  					   {"suggest.payload", "{}"},
  					   {"suggest.payload.manufacturer", Manufacturer},
  					   {"suggest.payload.tags", Tags},
  					   {"suggest.payload.polling_freq", Polling_freq},
  					   {"suggest.weight", Weight}
  					  ]
  					 ),
  			case erlastic_search:index_doc(?INDEX, "suggestion", Suggestion) of 
  				{error, _Reason} -> erlang:display("Suggestion not saved ");
  				{ok, _} -> 	ok
  