logs need to be sorted by time stamp otherwise the calculation of time will be all off.