improvements in prediction

almost working