flatting dir structure