added functionality to portal to create complex documents woooo hooooooo