add some code and comments