refactoring the custom node refactor methods