add API for doc stuff