corrected CustomQuadraticFunction such that all tests pass