refactoring target-dir