rework private key storage