Is the `$d` variable used anywhere here? I don't see it.