uncommented a set of code related to the computation in halo_merge.h