some changes in document creating procedure