update logic of generating verify code