Changed trainer to accept fit data