moved code to spreadsheet.load