added timeline logic