add basic docs for the API, fix #4