runtime refactoring