using brcompat instead of bridge; little refactoring