Added prediction feature functionality.

Prediction feature works to an extent.