added doctest and another problems