finished first version of pdf creation