workin on all-to-all part
optimize application of local H