Make primesTo smarter