change divergence formula