redid DoRecursive, changing func() to Functor()