refactoring big integer according to the api change