doctests + code quality passed