made testPrime report smallest factor when input is composite