merge and fix doctests