second ver of neig search