updates units and data_type