Changed logic of getting data from spreadsheet. Need to test and review some parts!