simplified recursive behavior, but only works for single top level
pruned old code and files