added server side code for extracting timeline json