fix formating and output of final calculations