private static function makeHashTable(Stringset $set, $size)
    {
        $table = array();
        // by default everything points to zero
        for ($i = 0; $i < $size; $i += 1) {
            $table[$i] = 0;
        }

        for ($i = 0; $i < $set->size(); $i += 1) {
            $item = $set->item($i);
            $hash = self::hash($item['id']);
            $index = $hash % $size;
            $inc = ($hash % ($size - 2)) + 1;

            // check for collisions
            while ($table[$index] !== 0) {
                if ($index < $size - $inc) {
                    $index += $inc;
                } else {
                    // out of bounds, start at the bottom
                    $index -= $size - $inc;
                }
            }

            // and insert it
            $table[$index] = $i + 1;
        }
        return $table;
    }