modified solver, train_val