amended to use config