Add prediction code