Use "var" only once at the top of a function