encode BigInt's