added ability to use a config file