improve isScalarValue
new function: makeDataFrame