added documentation for the API