Recursive algorithms do my head in 😉