An improved algorithm for dynamic nearest-neighbour models. Issue 3 (2nd September 2022)