handling imports for Python2 support