updated merger code to output distribution weighted correctly