implements jensen shannon divergence