change some functions in func.js