pass private key to constructor, change api