added setUserPublicKey functionality