Looks like this method could be `@tailrec`