added code to extract id, timestamp and data from string