changed doctest example to sorted list