how about making recursive or not as a parameter.