turned example into a doctest