code changes in user model