added logic to include 'datatype' column