building up replacement library on BigInt instead of BigInteger