recursion is the key