local NBNN detection, v0.1