fix ex1 to python 3