refactoring create-user