flattened the directories