script to convert pubkey