solution to remove duplicate from sortes list 2