preventing duplicate registrations