improved extracting time data