split document

add code for split document