subdirectories and multiple directories are now handled