refactored first row of data method