update models with relations and modify plans