bug fixes for neighbors modelling; full version works