fixed lavaan model and added ot obs.resid