add some comments and change some struct