pdf function added