Real final version for grading. Added formatting to output.