     iex> MethodCaller.call b, "c", [], context
     :c
 
+  Custom method caller that calls a function
+
+    iex> alias Serverboards.MOM.RPC.MethodCaller
+    iex> {:ok, mc} = MethodCaller.start_link
+    iex> MethodCaller.add_method_caller(mc, fn msg ->
+    ...>   case msg.method do
+    ...>     "hello."<>ret -> {:ok, ret}
+    ...>     _ -> :nok
+    ...>   end
+    ...> end)
+    iex> MethodCaller.call mc, "hello.world", [], nil
+    "world"
+    iex> MethodCaller.call mc, "world.hello", [], nil
+    ** (Serverboards.MOM.RPC.UnknownMethod) Unknown method "world.hello"
+
   """
   def add_method_caller(pid, pid) do
-    raise "Cant add a method caller to itself."
+    raise Exception, "Cant add a method caller to itself."
   end
   def add_method_caller(pid, nmc) do
+    Logger.info("Add caller #{inspect nmc}")
     Agent.update pid, fn st ->
       %{ st | mc: st.mc ++ [nmc] }
     end


  This another caller can be even shared between several method callers.

  Example:

  I will create three method callers, so that a calls, and b too. Method can
  be shadowed at parent too.

    iex> MethodCaller.call mc, "echo", ["test_"], context
    "test_ok"

    iex> alias Serverboards.MOM.RPC.{Context, MethodCaller}
    iex> MethodCaller.cast(fn msg -> {:ok, :ok} end, "any", [], nil, fn res -> :ok end)
    :ok

  """
  def cast(f, method, params, context, cb) when is_function(f)  do
    case f.(%RPC.Message{ method: method, params: params, context: context}) do
      {:ok, ret} ->
        cb.({:ok, ret})
        :ok
      {:error, other} ->
        cb.({:error, other})
        :ok
      {:error, :unknown_method} -> :nok
      :nok -> :nok
      :empty -> :empty
    end
  end

  def cast(pid, method, params, context, cb) when is_pid(pid) do
    st = Agent.get pid, &(&1)
    case Map.get st.methods, method do
      {f, options} ->
