added changes for trainer