extracted config loader