pass 8/8 junit tests. had to fix removeDuplicates