rename recursive function