Made Python python3 compatible