added percent in train func