refactored code to create SpreadsheetUtil