anchor.diff:              later(S, Late)
           end, 
           {}, 
  +        qlc:q([S || S <- mnesia:table(laconica_statuses), S#laconica_statuses.site =:= Site]));
  +
  +%% return latest count of statuses
  +latest({count, Count}) ->      
  +    webgnosus_dbi:map(
  +        fun(S, Late) ->  
  +            later(S, Late, Count)
  +        end, 
  +        [], 
  +        qlc:q([S || S <- mnesia:table(laconica_statuses)]));
  +
  +%% return latest count of statuses for specified site
  +latest({{site, Site}, {count, Count}}) ->      
  +    webgnosus_dbi:map(
  +        fun(S, Late) ->  
  +            later(S, Late, Count)
  +        end, 
  +        [], 
           qlc:q([S || S <- mnesia:table(laconica_statuses), S#laconica_statuses.site =:= Site])).
   
   %%====================================================================
  
positive.code:         _ -> 
              false
      end.
  
negative.code:     S;
  
  older(S, Old) ->  
      SSecs  = date_to_gregorian_seconds(S),
      OldSecs = date_to_gregorian_seconds(Old),
      if 
           SSecs < OldSecs ->
              S;
          true -> 
              Old
      end.
  
  %%--------------------------------------------------------------------
  %% Func: later/2
  %% Description: return later status
  %%--------------------------------------------------------------------
  later(S, {}) ->  
      S;
  
  later(S, Late) ->  
      SSecs   = date_to_gregorian_seconds(S),
      LateSecs = date_to_gregorian_seconds(Late),
      if 
           SSecs > LateSecs ->
              S;
          true -> 
              Late
      end.
      
  %%--------------------------------------------------------------------
  %% Func: later/3
  %% Description: add status to late list if later than any in list
  %%--------------------------------------------------------------------
  later(S, Late, Count) ->
      SSecs   = date_to_gregorian_seconds(S),  
      LateSize = length(Late),
      if
          LateSize < Count ->
              lists:keysort(1, [{SSecs, S} | Late]);
          true ->
              update_later_list(SSecs, S, Late)
      end.
  
  %%--------------------------------------------------------------------
  