adding doctests for objects