properly parse bignumbers