changes for the first phase of checking for empty directories