added PDF functionality