Can't we just do this when endTime is 0?