Changed find neighbours code