implement verify code