clean up indentations and added the option to select a keyring for verification