add reduce && recursion