removeDuplicate method description refined