updated predictictive algorithm