refactoring change directory