creating resizeTimeline function