changes for pdf generation