added duplication check for registration.