Separate the config search function
Anyway, add the test