implemented divergence distance and their test