removed unnecessary code for python 3