fix error in prediction
cleaning code