Refactored row_neighbours method