sort then skip duplications