implemented time traveling with thread execution