adding nonce checking method