added formatting to final code