refactor dir