iter_B deleted
partition_data and merge_data needs furthur coding