add doc to chain.exs