added global prediction and choose prediction