finish refactor dir