Slightly simplified recursion