isNonceValid seems to be working