anchor.diff:      State.
   
   work_on_phase(JobId, MRState) ->
  +    MyRange = mr_state:get(MRState, my_range),
       case mr_state:get_phase(MRState) of
           {_Round, _MoR, _FunTerm, []} ->
               case mr_state:is_last_phase(MRState) of
                   false ->
                       Master = mr_state:get(MRState, master),
  -                    MyRange = mr_state:get(MRState, my_range),
                       comm:send(Master, {mr, phase_completed, MyRange}),
                       ?TRACE("no data for phase...done...~p informs master~n", [self()]);
                   _ ->
  
positive.code:     comm:send(Source, mr_state:get(NewMRState, my_range)),
      dht_node_state:set_mr_state(State, JobId, NewMRState);
  
  on({mr, next_phase_data_ack, {JobId, Ref}, Interval}, State) ->
      NewMRState = mr_state:set_acked(dht_node_state:get_mr_state(State, JobId),
                                      {Ref, Interval}),
      case mr_state:is_acked_complete(NewMRState) of
          true ->
              Master = mr_state:get(NewMRState, master),
              MyRange = mr_state:get(NewMRState, my_range),
              comm:send(Master, {mr, phase_completed, MyRange}),
              ?TRACE("Phase complete...~p informing master~n", [self()]);
          false ->
              ?TRACE("~p is still waiting for phase to complete~n", [self()])
  
negative.code:                                                                       my_range)})
              end;
          Phase ->
              Reply = comm:reply_as(comm:this(), 4, {mr, phase_result, JobId, '_',
                                                    MyRange}),
              comm:send_local(pid_groups:get_my(wpool), 
                              {do_work, Reply, Phase})
      end.
  