I think numberOfNeighbors is not well chosen variable name, because it actually holds "number of neighbors + 1" (0, 3, 9, 27)