tiny restructuring before encapsulating