local NBNN debugged