changed config to global vars