refactoring to user