switch to using a Config struct