add ftree-with-measure: parameterized measure