refactor deep-directory structure usage