add public gpg key
fix some unpythonic code