added verification to register handler