adding routine to determine joint confidence band