Work in progress

Fixing up prediction mechanism