fixed printing function and unionDataSet()