added user model and conditional