2 bugs fixed. 1. using prev_t on new trials. 2. not having start and end time points