refactors user model