add comment and remove some code