added wrap for function randomlyGenerateBigInt, did some refactor