Working without the reference line
trying filtering with interpolation