refactor dirs