added handler for registration