fix py3 compability
pep8 fixes