adding doctests to the module
unroll implementation