Finish working  python2 version
Make Python 3 compatibile