adapting to python 3

adapting to python 3 and deleting something not belong to this project