Could please you explain in a little more detail this ideea? I am trying to write an algorithm for detecting divergence...