Use distinct instead of uniq which is deprecated