change subtextdoc function