directory refactorying