new version with working externalized config