added api docs/comments