timing refactoring