add time-based termination