refactors user model to minimize db queries