some changes in Model and ModelTest