change function of primecheck