Modified things for python 2