Can you make a note that this is a recursive function. It wasn't immediately obvious when reading this for the first time.