modify and add some functions