refactoring userservice