delete useless functions and add some comments
delete useless functions and add some comments