refactor the directories