moved config vars to scope