refine spreadsheet class