add check user
refactoring