directory refactoring