added one doctest just for fun. But for correct work it need nose module, for which we need to run init code in some way
first attempt of design