add same scoping extension as in bonaparte