refactor node