Playing with the document API