restructuring to facilitate capturing and bubbling