Use same train func