refactor directory