Recursive algorithm no longer relies on wrapping content arbitrarily