fixing datastructures tests and migrate datastructures.py to python 3