vars must be declared first for IE<=8