added weights to input matrix union (oops)