refactoring runtime