refactoring dir's