swap bignum for cbignum, add tests