refactoring user's model