Adding python3 compatibility