Added non-local nearest k>1 functionality