Trying to make code Python3 complient