refactoring of node