added pdf funcitonality