simplify config_lookup function