adding the pdf functionality