Updated to python 3+