         Logger.info "I'm DONE."
                  <> "List of empls: #{inspect task_data.employers}\n"
                  <> "Task: #{task_data.task} (#{coef})"
-    end
-
-    def should_exchange? first, second do
+        {:stop, :normal, task_data}
+    end
+
+    defp should_exchange? first, second do
         {first_new, second_new} = Tasks.exchange(first, second)
 
         old_disbalance = [first, second]

        end
    end

    defp initial_deal_employers task_data do
        receive do
            {:employer, empl} ->
                Logger.info "Employer (#{empl}) added"
                updated = task_data |> Tasks.push_employer(empl)
                initial_deal_employers updated
            {:deal_finished, tasks} ->
                empls = task_data.employers
                coef = task_data.skill_sum / task_data.task
                Logger.info "Received :deal_finished.\n"
                         <> "List of empls: #{inspect empls}\n"
                         <> "Task: #{task_data.task} (#{coef})"
                updated = task_data |> Tasks.push_remaining_tasks(tasks)
                try_exchange(updated)
        end
    end

    def try_exchange task_data do

        new_disbalance < old_disbalance
    end

    defp load_data filename do
        {:ok, list} = filename |> File.read! |> JSON.decode
        parse_data list
    end

    defp parse_data kw do
        %TaskSpec{
            employers: kw["employers"],
            task:      kw["task"]
