refactor verification