modified to proper model