Adding a new document. Application of stack. Sample e.g.