added end document