add code and comments