simplify the recursive process