added ability to recurse