refactoring user-related examples