supports dynamic changes of document