need to pull
now return abs of merge cost in calculate quad error so that numerical errors dont accumulate