         receive do
             {:employer, empl} ->
                 Logger.info "Employer (#{empl}) added"
-                updated = task_data |> TaskProto.push_employer(empl)
+                updated = task_data |> Tasks.push_employer(empl)
                 initial_deal_employers updated
             {:deal_finished, tasks} ->
                 empls = task_data.employers

                    check_offers_finally(task_data)
                end
        after 2_000 ->
            coef = task_data.skill_sum / task_data.task
            Logger.info "I'm DONE."
                     <> "List of empls: #{inspect task_data.employers}\n"
                     <> "Task: #{task_data.task} (#{coef})"
        end
    end

    def should_exchange? first, second do
        {first_new, second_new} = exchange(first, second)

        old_disbalance = [first, second]
                        |> Enum.map(&TaskProto.disbalance &1)
                        |> Enum.sum

        new_disbalance = [first_new, second_new]
                        |> Enum.map(&TaskProto.disbalance &1)
                        |> Enum.sum

        new_disbalance < old_disbalance
    end

    def exchange data, other do
        {m_e, m_updated} = data  |> TaskProto.pop_employer
        {o_e, o_updated} = other |> TaskProto.pop_employer
        m_new = m_updated |> TaskProto.push_employer(o_e)
        o_new = o_updated |> TaskProto.push_employer(m_e)
        {m_new, o_new}
    end

    def perfect_state _data do

                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
        Logger.info "try_exchange"
        r = task_data |> Tasks.pop_remaining_task
        if is_nil(r) do
            Logger.info "We tried all tasks!"
            check_offers_finally(task_data)
        else
            {t, without_task} = r
            Logger.info "Only #{length without_task.remaining_tasks} tasks left"
            if t != self() do
                send t, {:go_exchange, self(), without_task}
                wait_agreement = fn itself ->
