output is now identical to what is needed in spreadsheet