Made the example pythonic