moved startTime and endTime to time control, instead of ncwms