Added the prediction functionality