almost finished AddConstraints method in Model class