added pdf generation