anchor.diff:                                  |> List.filter (fun (a,b) -> a <> 0.) 
                                   // round to nearest xValue and afterwards round the xValue to 2 decimals for printing
                                   |> List.map (fun (xVal,yVal) -> round 2 (Aux.roundToNext xVal xValues))
  +                            //let startFstDerivative = Core.Operators.sign (fstDerivFu xValues.[1])
  +                            let startSndDerivative = Core.Operators.sign (sndDerivFu xValues.[1])
                               
                               // walk through second derivative and identify all local extrema
                               let rec loop sign pMa pMi accMa accMi i = 
                                   if i = sndDerivativeValues.Length - 1 then 
  -                                    if sign = 1 then  
  -                                        let pseudoMaxima = pMa::accMa |> processPseudoExtrema
  -                                        let pseudoMinima = accMi      |> processPseudoExtrema
  -                                        sprintf "%A,%A" pseudoMaxima pseudoMinima                                                                       
  -                                    else                                                                                                                
  -                                        let pseudoMaxima = accMa      |> processPseudoExtrema
  -                                        let pseudoMinima = pMi::accMi |> processPseudoExtrema
  -                                        sprintf "%A,%A" pseudoMaxima pseudoMinima
  +                                    // add last potential PseudoExtremum to respective list
  +                                    // first true PseudoExtremum indicates direction
  +                                    let (maFin,miFin) =
  +                                        if sign = 1 then  
  +                                            let pseudoMaxima = pMa::accMa |> processPseudoExtrema
  +                                            let pseudoMinima = accMi      |> processPseudoExtrema
  +                                            pseudoMaxima,pseudoMinima
  +                                        else                                                                                                                
  +                                            let pseudoMaxima = accMa      |> processPseudoExtrema
  +                                            let pseudoMinima = pMi::accMi |> processPseudoExtrema
  +                                            pseudoMaxima,pseudoMinima
  +                                    
  +                                    // if every pseudo extremum is below the sensitivity threshold classify by "I" and "D"
  +                                    if maFin = [] && miFin = [] then
  +                                        ""
  +                                    //if sensitivity is maximal, take all local extrema for sub classification
  +                                    elif sensitivity = 1. then
  +                                        sprintf "%A,%A" maFin miFin
  +                                    else 
  +                                        // only one kind of pseudo maximum is reasonable in monoton signals. 
  +                                        let firstPseudoMaximum = if maFin = [] then infinity else maFin.[0]
  +                                    
  +                                        let firstPseudoMinimum = if miFin = [] then infinity else miFin.[0]
  +                                        
  +                                        let firstPseudoExtremum = min firstPseudoMaximum firstPseudoMinimum
  +                                        
  +                                        let slopeAtFstPseudoExtremum = fstDerivFu firstPseudoExtremum
  +
  +                                        if firstPseudoMaximum < firstPseudoMinimum then 
  +                                            //sprintf "%A,%A" maFin []  
  +                                            if Core.Operators.sign slopeAtFstPseudoExtremum = -1 then 
  +                                                sprintf "%A,%A" maFin []    
  +                                            else sprintf "%A,%A" [] miFin 
  +                                        else 
  +                                            if Core.Operators.sign slopeAtFstPseudoExtremum = 1 then 
  +                                                sprintf "%A,%A" [] miFin   
  +                                            else sprintf "%A,%A" maFin [] 
                                   else 
                                       let (_,prevY)   = sndDerivativeValues.[i-1] 
                                       let (tmpX,tmpY) = sndDerivativeValues.[i] 
  
positive.code:             (fun t ->
                  let i = 
                      match Array.tryFindIndexBack (fun xs -> xs <= t) (x.InternalValues) with 
                      | Some x -> x 
                      | None   -> failwith "The x-value is not part of the section used to estimate the spline coefficients, thus a monotone function progression can not be guaranteed"
                  evalAt i t
                  )
  
negative.code:                     if not plateau then
                          if traceA.[0] < (Seq.last traceA) then "I" else "D"
                      else
                          //get Array of secondderivatives with reasonably spacing (xValues and halfsteps)
                          let sndDerivativeValues =
                              [0..xValues.Length-2]
                              |> List.map (fun x -> 
                                  let xValA = xValues.[x]
                                  let xValB = (xValues.[x] + xValues.[x+1]) / 2.
                                  [
                                  xValA,sndDerivFu xValA
                                  xValB,sndDerivFu xValB
                                  ]
                                  )
                              |> List.concat
                          let pseudoExtrema =
                              let processPseudoExtrema (pseudoExtrema :(float*float) list) =
                                  pseudoExtrema
  