add some comments and remove debug info