refactored nod