some refactoring of timeline