some of the comments and format changed