anchor.diff:  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
   start() ->
  -    register(master, self()),
  -    HashList = [{null, null}],
  -    loop(HashList).
  +    %register(scheduler, spawn(scheduler)),
  +    HashList = [{null, null}],          %{Hashtag, Score}
  +    Requests = [{null, {null, null}}],  %{Hashtag, Requestor}
  +    register(master, spawn(master, loop, [HashList, Requests])),
  +    ok.
   
   
  -loop(HashList) ->
  +loop(HashList, Requests) ->
       receive
  -        {Query} -> scraper:scrape(Query);
  -        {result, Hashtag, Score} -> loop([{Hashtag, Score}|HashList]);
  -        {lookup, Hashtag, Pid} ->
  +        {result, Hashtag, Score, _HashtagList} -> %TODO:delete that underscore
  +            Requestor = requested(Hashtag, Requests),
  +            case Requestor == not_found of
  +                true -> loop([{Hashtag, Score}|HashList], Requests);
  +                false -> self() ! {lookup, Hashtag, Requestor},
  +                         loop([{Hashtag, Score}|HashList],
  +                                  remove(Requestor, Requests))
  +            end;
  +        {lookup, Hashtag, Requestor} ->
               Score = score(Hashtag, HashList),
               case Score == not_found of
  -                true -> scraper:scrape(Hashtag);
  -                false -> whereis(interface) ! {Hashtag, Score}
  +                true -> scraper:scrape(Hashtag),
  +                        loop(HashList, [{Hashtag, Requestor}|Requests]);
  +                false -> Requestor ! {Hashtag, Score},
  +                         loop(HashList, Requests)
               end
  -    end,
  -    loop(HashList).
  -
  -
  +    end.
   
   score(Query, [{Hashtag, Score}|T]) ->
       if
  
positive.code:         Hashtag == null -> not_found;
          true -> score(Query, T)
      end.
      
  
negative.code: -module(master).
  -export([start/0, test/1, loop/2]).
  
  %% This is our MVP. Call master:test(Hashtag) and it returns the score.
  
  