add comment and delete some unused variable