updated to add subdirectories