key verification moved to sub