filter duplicate ids