root refactor