refactored name in user, and added tests