refactoring recompileConfig to accept parameters