fixed typo, added simple doctest