added support for processing subfolders