added API documentation.