Changed appraoch to column index access due to problems with group by