recursion functions complete.