added some code for the nonce request