"d" is a local variable

Without "var" it will be global.
Merge pull request #2 from tanob/patch-1

"d" is a local variable