Design pattern with node