experimental code to train any class