refactoring with time