updated for multiple secrets formats and pep8