added all the rows, sorted and removed duplicates