reconstract the directories