refactored dir tree