support passing config