add mathod for creating pdf