bug in setting public/private key...still checking..