added documentation for public functions