added remove duplicates algo for unsorted list