initial api docs. not quite accurate yet