split the directories