fitting model with demographics