renamed Model to SModel to avoid confusion