update to pep8 style and made small changes