doctests pass now