modify config retrieval and unit test