added api docs and reference