added the option to inject an instance of brocasr in opts