added documentation for public api