Rework for Python 3
Give working examples