Made this python3 compatible