Rewrite KeyPair again