implements pdf
new feature and bug fixed