refactoring and turning Users generic