add doctest for utils