read code and add some comments