adds anti-duplication features