directory refactored