refactoring method isNewUser