add some comments
delete some unused code