internal reworking/refactoring