working implementation of big int