Modified codes with sendProofMessage