issue #5: better algorithm for disordered data