kld code uses marginalized instead of shuffled pdf