added method getDocument