fixing assert issue with python 2.6
fixing imports for python 3