refactor dir tree