beta code to interface gpg