modify the prediction function