changed PredType to VarType