Making it work with python 3