fix minor error and add prediction