added reduced version of genNeighbors