checkout this code into spreadsheet