make config processing common.