Refactor to use pubKey approach
Use the publickey as input