exception handling + pep8