Good use of recursion.