changed duplicate removal from sets to distaint