refactoring user model and stuff