decoupled config for Restangualar into a factory