wrap document stuff.