node refactor