added nonce check