added a class to trainer functions