more refactoring on the class train