change some comments and outdated function API