return self and fix doctest