fix comments and format output