added column merging and weighted summing