refactor to support 64bit int via bigint