rewrote instance without public key query