update the nonce logic