added missing var declarations