use distinct instead of uniq