add nested case function like {case(a,b) => a + b }