remove dependance on global config pointer