Timeline generator code