-semi working version of pdf program