Forgot to add gridSize calculation to allPairs