I have corrected function "makePrediction"