   defmodule Worker do
     def loop do
       receive do
-        {:calc, sender, text} -> send sender, {:freq, calc(text)}
+        {:calc, sender, text} -> send sender, {:freq, self, calc(text)}
         _ -> IO.puts "unknown"
       end
     end

    pids
    |> Enum.flat_map(fn pid ->
      receive do
        {:freq, freq} -> freq
      end
    end)
    |> Enum.reduce(%{}, fn {k, c}, m ->

    Enum.map(chunked_texts, fn chunked_texts ->
      pid = spawn_link(Worker, :loop, [])
      send pid, {:calc, self, chunked_texts}
      pid
    end)
  end

