set up binary matrix for merging