replaced "const" with "var"