wrote REML trainer call