update spec format and change some function names