adjust document contents