     end
   end
 
-  @doc """
-  Starts an event manager linked to the current process.
-
-  This is often used to start the `GenEvent` as part of a supervision tree.
-
-  It accepts the `:name` option which is described under the `Name Registration`
-  section in the `GenServer` module docs.
-
-  If the event manager is successfully created and initialized, the function
-  returns `{:ok, pid}`, where `pid` is the PID of the server. If a process with
-  the specified server name already exists, the function returns
-  `{:error, {:already_started, pid}}` with the PID of that process.
-
-  Note that a `GenEvent` started with `start_link/1` is linked to the
-  parent process and will exit not only on crashes but also if the parent
-  process exits with `:normal` reason.
-  """
   @spec start_link(options) :: on_start
   def start_link(options \\ []) when is_list(options) do
     do_start(:link, options)
   end
 
-  @doc """
-  Starts an event manager process without links (outside of a supervision tree).
-
-  See `start_link/1` for more information.
-  """
   @spec start(options) :: on_start
   def start(options \\ []) when is_list(options) do
     do_start(:nolink, options)

      timeout: Keyword.get(options, :timeout, :infinity)}
  end

  @doc """
  Adds a new event handler to the event `manager`.

  The event manager will call the `c:init/1` callback with `args` to
  initiate the event handler and its internal state.

  If `c:init/1` returns a correct value indicating successful completion,
  the event manager adds the event handler and this function returns
  `:ok`. If the callback fails with `reason` or returns `{:error, reason}`,
  the event handler is ignored and this function returns `{:error, reason}`.

  If the given handler was previously installed at the manager, this
  function returns `{:error, :already_present}`.

  For installing multiple instances of the same handler, `{Module, id}` instead
  of `Module` must be used. The handler could be then referenced with
  `{Module, id}` instead of just `Module`.
  """
  @spec add_handler(manager, handler, term) :: :ok | {:error, term}
  def add_handler(manager, handler, args) do
    rpc(manager, {:add_handler, handler, args})
  end

  @doc """
  Adds a monitored event handler to the event `manager`.

  Expects the same input and returns the same values as `add_handler/3`.

  ## Monitored handlers

  A monitored handler implies the calling process will now be monitored
  by the GenEvent manager.

  If the calling process later terminates with `reason`, the event manager
  will delete the event handler by calling the `c:terminate/2` callback with
  `{:stop, reason}` as argument. If the event handler later is deleted,
  the event manager sends a message `{:gen_event_EXIT, handler, reason}`
  to the calling process. Reason is one of the following:

    * `:normal` - if the event handler has been removed due to a call to
      `remove_handler/3`, or `:remove_handler` has been returned by a callback
      function

    * `:shutdown` - if the event handler has been removed because the event
      manager is terminating

    * `{:swapped, new_handler, pid}` - if the process PID has replaced the
      event handler by another

    * `term` - if the event handler is removed due to an error. Which term
      depends on the error

  Keep in mind that the `{:gen_event_EXIT, handler, reason}` message is not
  guaranteed to be delivered in case the manager crashes. If you want to
  guarantee the message is delivered, you have two options:

    * monitor the event manager
    * link to the event manager and then set `Process.flag(:trap_exit, true)`
      in your handler callback

  Finally, this functionality only works with GenEvent started via this
  module (it is not backwards compatible with Erlang's `:gen_event`).
  """
  @spec add_mon_handler(manager, handler, term) :: :ok | {:error, term}
  def add_mon_handler(manager, handler, args) do
    rpc(manager, {:add_mon_handler, handler, args, self()})
  end

  @doc """
  Sends an event notification to the event `manager`.

  The event manager will call `c:handle_event/2` for each
  installed event handler.

  `notify` is asynchronous and will return immediately after the
  notification is sent. `notify` will not fail even if the specified
  event manager does not exist, unless it is specified as an atom.
  """
  @spec notify(manager, term) :: :ok
  def notify(manager, event)


    end
  end

  @spec remove_handler(manager, handler, term) :: term | {:error, term}
  def remove_handler(manager, handler, args) do
    rpc(manager, {:delete_handler, handler, args})
  end

  @spec swap_handler(manager, handler, term, handler, term) :: :ok | {:error, term}
  def swap_handler(manager, handler1, args1, handler2, args2) do
    rpc(manager, {:swap_handler, handler1, args1, handler2, args2})
  end

  @spec swap_mon_handler(manager, handler, term, handler, term) :: :ok | {:error, term}
  def swap_mon_handler(manager, handler1, args1, handler2, args2) do
    rpc(manager, {:swap_mon_handler, handler1, args1, handler2, args2, self()})
  end

  @spec which_handlers(manager) :: [handler]
  def which_handlers(manager) do
    rpc(manager, :which_handlers)
  end

  @spec stop(manager, reason :: term, timeout) :: :ok
  def stop(manager, reason \\ :normal, timeout \\ :infinity) do
    :gen.stop(manager, reason, timeout)
