Adding support for py3k

fixed import issues in py3k