change second parameter of getProbability from array [] to array ...