add saveDocument concept