middle of primeTime function