write main model, create new data object, write chande model