fixed typo and added comments
fixed pep8 warnings