added some API documentation