improvements on document visualization