remove some code and add some comments