refactor before checked