added doctest samples.