node: add update method and refactored