code cleaning. formatted output