A couple small changes to make the code work recursively