added new document fn

fixed some display issues