Updated Prediction Code