fixed prediction calculus bug