missing bracket and pep8 fixes