fix variable clash
a nonce is an increasing integer
parse response json