filter equal IDs, too