switch depend python2 to python3 + simplify