fixed TODO: int32 vs uint64; use math/big