update API, add comments.