Added doctests to utils