documentation for main function
documenting unstable API