fixed check neighbours routine