Modify and add some functions and interface