add sort and uniq