convert py2.x style to py3.x style