adding pdfs for optimal graphs