now uses a cfg file