edit for pdf to generate properly