reimplementing add-model